home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 January: Mac OS SDK / Dev.CD Jan 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / AIncludes / ASDebugging.a < prev    next >
Encoding:
Text File  |  1997-08-12  |  8.3 KB  |  283 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        ASDebugging.a
  3. ;
  4. ;    Contains:    AppleScript Debugging Interfaces.
  5. ;
  6. ;    Version:    Technology:    AppleScript 1.1
  7. ;                Release:    Universal Interfaces 3.0.1
  8. ;
  9. ;    Copyright:    © 1992-1997 by Apple Computer, Inc., all rights reserved
  10. ;
  11. ;    Bugs?:        Please include the the file and version information (from above) with
  12. ;                the problem description.  Developers belonging to one of the Apple
  13. ;                developer programs can submit bug reports to:
  14. ;
  15. ;                    devsupport@apple.com
  16. ;
  17. ;
  18.     IF &TYPE('__ASDEBUGGING__') = 'UNDEFINED' THEN
  19. __ASDEBUGGING__ SET 1
  20.  
  21.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  22.     include 'Types.a'
  23.     ENDIF
  24.     IF &TYPE('__FILES__') = 'UNDEFINED' THEN
  25.     include 'Files.a'
  26.     ENDIF
  27.     IF &TYPE('__COMPONENTS__') = 'UNDEFINED' THEN
  28.     include 'Components.a'
  29.     ENDIF
  30.     IF &TYPE('__APPLEEVENTS__') = 'UNDEFINED' THEN
  31.     include 'AppleEvents.a'
  32.     ENDIF
  33.     IF &TYPE('__APPLESCRIPT__') = 'UNDEFINED' THEN
  34.     include 'AppleScript.a'
  35.     ENDIF
  36.  
  37. ; **************************************************************************
  38. ;    Mode Flags
  39. ;*************************************************************************
  40.  
  41. ;      This mode flag can be passed to OSASetProperty or OSASetHandler
  42. ;    and will prevent properties or handlers from being defined in a context
  43. ;    that doesn't already have bindings for them. An error is returned if
  44. ;    a current binding doesn't already exist. 
  45. ;
  46.  
  47.  
  48. kOSAModeDontDefine                EQU        $0001
  49. ; **************************************************************************
  50. ;    Component Selectors
  51. ;*************************************************************************
  52.  
  53.  
  54. kASSelectSetPropertyObsolete    EQU        $1101
  55. kASSelectGetPropertyObsolete    EQU        $1101
  56. kASSelectSetHandlerObsolete        EQU        $1103
  57. kASSelectGetHandlerObsolete        EQU        $1104
  58. kASSelectGetAppTerminologyObsolete EQU    $1105
  59. kASSelectSetProperty            EQU        $1106
  60. kASSelectGetProperty            EQU        $1107
  61. kASSelectSetHandler                EQU        $1108
  62. kASSelectGetHandler                EQU        $1109
  63. kASSelectGetAppTerminology        EQU        $110A
  64. kASSelectGetSysTerminology        EQU        $110B
  65. kASSelectGetPropertyNames        EQU        $110C
  66. kASSelectGetHandlerNames        EQU        $110D
  67. ; **************************************************************************
  68. ;    Context Accessors
  69. ;*************************************************************************
  70.  
  71. ;
  72. ; pascal OSAError OSASetProperty(ComponentInstance scriptingComponent, long modeFlags, OSAID contextID, const AEDesc *variableName, OSAID scriptValueID)
  73. ;
  74.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  75.         Macro
  76.         _OSASetProperty
  77.             move.l              #$00101106,-(sp)
  78.             moveq               #0,D0
  79.             dc.w                $A82A
  80.         EndM
  81.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  82.         IMPORT_CFM_FUNCTION OSASetProperty
  83.     ENDIF
  84.  
  85. ;
  86. ; pascal OSAError OSAGetProperty(ComponentInstance scriptingComponent, long modeFlags, OSAID contextID, const AEDesc *variableName, OSAID *resultingScriptValueID)
  87. ;
  88.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  89.         Macro
  90.         _OSAGetProperty
  91.             move.l              #$00101107,-(sp)
  92.             moveq               #0,D0
  93.             dc.w                $A82A
  94.         EndM
  95.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  96.         IMPORT_CFM_FUNCTION OSAGetProperty
  97.     ENDIF
  98.  
  99. ;
  100. ; pascal OSAError OSAGetPropertyNames(ComponentInstance scriptingComponent, long modeFlags, OSAID contextID, AEDescList *resultingPropertyNames)
  101. ;
  102.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  103.         Macro
  104.         _OSAGetPropertyNames
  105.             move.l              #$000C110C,-(sp)
  106.             moveq               #0,D0
  107.             dc.w                $A82A
  108.         EndM
  109.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  110.         IMPORT_CFM_FUNCTION OSAGetPropertyNames
  111.     ENDIF
  112.  
  113. ;
  114. ; pascal OSAError OSASetHandler(ComponentInstance scriptingComponent, long modeFlags, OSAID contextID, const AEDesc *handlerName, OSAID compiledScriptID)
  115. ;
  116.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  117.         Macro
  118.         _OSASetHandler
  119.             move.l              #$00101108,-(sp)
  120.             moveq               #0,D0
  121.             dc.w                $A82A
  122.         EndM
  123.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  124.         IMPORT_CFM_FUNCTION OSASetHandler
  125.     ENDIF
  126.  
  127. ;
  128. ; pascal OSAError OSAGetHandler(ComponentInstance scriptingComponent, long modeFlags, OSAID contextID, const AEDesc *handlerName, OSAID *resultingCompiledScriptID)
  129. ;
  130.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  131.         Macro
  132.         _OSAGetHandler
  133.             move.l              #$00101109,-(sp)
  134.             moveq               #0,D0
  135.             dc.w                $A82A
  136.         EndM
  137.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  138.         IMPORT_CFM_FUNCTION OSAGetHandler
  139.     ENDIF
  140.  
  141. ;
  142. ; pascal OSAError OSAGetHandlerNames(ComponentInstance scriptingComponent, long modeFlags, OSAID contextID, AEDescList *resultingHandlerNames)
  143. ;
  144.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  145.         Macro
  146.         _OSAGetHandlerNames
  147.             move.l              #$000C110D,-(sp)
  148.             moveq               #0,D0
  149.             dc.w                $A82A
  150.         EndM
  151.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  152.         IMPORT_CFM_FUNCTION OSAGetHandlerNames
  153.     ENDIF
  154.  
  155. ;
  156. ; pascal OSAError OSAGetAppTerminology(ComponentInstance scriptingComponent, long modeFlags, FSSpec *fileSpec, short terminologyID, Boolean *didLaunch, AEDesc *terminologyList)
  157. ;
  158.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  159.         Macro
  160.         _OSAGetAppTerminology
  161.             move.l              #$0012110A,-(sp)
  162.             moveq               #0,D0
  163.             dc.w                $A82A
  164.         EndM
  165.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  166.         IMPORT_CFM_FUNCTION OSAGetAppTerminology
  167.     ENDIF
  168.  
  169. ;  Errors:
  170. ;       errOSASystemError        operation failed
  171. ;    
  172.  
  173. ;
  174. ; pascal OSAError OSAGetSysTerminology(ComponentInstance scriptingComponent, long modeFlags, short terminologyID, AEDesc *terminologyList)
  175. ;
  176.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  177.         Macro
  178.         _OSAGetSysTerminology
  179.             move.l              #$000A110B,-(sp)
  180.             moveq               #0,D0
  181.             dc.w                $A82A
  182.         EndM
  183.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  184.         IMPORT_CFM_FUNCTION OSAGetSysTerminology
  185.     ENDIF
  186.  
  187. ;  Errors:
  188. ;       errOSASystemError        operation failed
  189. ;    
  190.  
  191. ;  Notes on terminology ID
  192. ;
  193. ;    A terminology ID is derived from script code and language code
  194. ;    as follows;
  195. ;
  196. ;        terminologyID = ((scriptCode & 0x7F) << 8) | (langCode & 0xFF)
  197. ;
  198.  
  199.  
  200. ; **************************************************************************
  201. ;    Obsolete versions provided for backward compatibility:
  202. ;
  203.  
  204. ;
  205. ; pascal OSAError ASSetProperty(ComponentInstance scriptingComponent, OSAID contextID, const AEDesc *variableName, OSAID scriptValueID)
  206. ;
  207.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  208.         Macro
  209.         _ASSetProperty
  210.             move.l              #$000C1101,-(sp)
  211.             moveq               #0,D0
  212.             dc.w                $A82A
  213.         EndM
  214.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  215.         IMPORT_CFM_FUNCTION ASSetProperty
  216.     ENDIF
  217.  
  218. ;
  219. ; pascal OSAError ASGetProperty(ComponentInstance scriptingComponent, OSAID contextID, const AEDesc *variableName, OSAID *resultingScriptValueID)
  220. ;
  221.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  222.         Macro
  223.         _ASGetProperty
  224.             move.l              #$000C1102,-(sp)
  225.             moveq               #0,D0
  226.             dc.w                $A82A
  227.         EndM
  228.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  229.         IMPORT_CFM_FUNCTION ASGetProperty
  230.     ENDIF
  231.  
  232. ;
  233. ; pascal OSAError ASSetHandler(ComponentInstance scriptingComponent, OSAID contextID, const AEDesc *handlerName, OSAID compiledScriptID)
  234. ;
  235.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  236.         Macro
  237.         _ASSetHandler
  238.             move.l              #$000C1103,-(sp)
  239.             moveq               #0,D0
  240.             dc.w                $A82A
  241.         EndM
  242.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  243.         IMPORT_CFM_FUNCTION ASSetHandler
  244.     ENDIF
  245.  
  246. ;
  247. ; pascal OSAError ASGetHandler(ComponentInstance scriptingComponent, OSAID contextID, const AEDesc *handlerName, OSAID *resultingCompiledScriptID)
  248. ;
  249.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  250.         Macro
  251.         _ASGetHandler
  252.             move.l              #$000C1104,-(sp)
  253.             moveq               #0,D0
  254.             dc.w                $A82A
  255.         EndM
  256.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  257.         IMPORT_CFM_FUNCTION ASGetHandler
  258.     ENDIF
  259.  
  260. ;
  261. ; pascal OSAError ASGetAppTerminology(ComponentInstance scriptingComponent, FSSpec *fileSpec, short terminologID, Boolean *didLaunch, AEDesc *terminologyList)
  262. ;
  263.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  264.         Macro
  265.         _ASGetAppTerminology
  266.             move.l              #$000E1105,-(sp)
  267.             moveq               #0,D0
  268.             dc.w                $A82A
  269.         EndM
  270.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  271.         IMPORT_CFM_FUNCTION ASGetAppTerminology
  272.     ENDIF
  273.  
  274. ;  Errors:
  275. ;        errOSASystemError        operation failed
  276. ;    
  277.  
  278. ; *************************************************************************
  279.  
  280.  
  281.     ENDIF ; __ASDEBUGGING__ 
  282.  
  283.